//package com.medi.chats.config;
//
//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//
//@Configuration
//@EnableWebSecurity
//@EnableGlobalMethodSecurity(prePostEnabled = true)
//@ConditionalOnProperty(name = "chats.security.enabled", havingValue = "true", matchIfMissing = true)
//public class SecurityConfig extends WebSecurityConfigurerAdapter {
//    private String googleClientSecret;
//
//    /*
//     * (non-Javadoc)
//     *
//     * @see org.springframework.security.config.annotation.web.configuration.
//     * WebSecurityConfigurerAdapter
//     * #configure(org.springframework.security.config
//     * .annotation.web.builders.HttpSecurity)
//     */
//    @Override
//    protected void configure(HttpSecurity http) throws Exception {
//        // @formatter:off
////        http
////                .authorizeRequests()
////                .antMatchers(HttpMethod.GET, "/","/static/**", "/resources/**","/resources/public/**").permitAll()
////                .anyRequest().authenticated()
////                .and()
////                .formLogin()
////                .and()
////                .httpBasic().disable()
////                .requiresChannel().anyRequest().requiresSecure();
//
//        http
//                .authorizeRequests()
//                .anyRequest().authenticated()
////                .and()
////                .formLogin()
//                .and()
//                .httpBasic().disable();
//        // @formatter:on
//        super.configure(http);
//    }
//
////    @Override
////    protected void configure(AuthenticationManagerBuilder auth)
////            throws Exception {
////        // @formatter:off
////        auth
////                .eraseCredentials(true)
////                .userDetailsService();
////        // @formatter:on
////        super.configure(auth);
////    }
//}
